Log in Register Dashboard Temp Share Shortlinks Frames API

cody - HTMLify profile

cody's Profile Picture

cody

4270 Files

632702 Views

Latest files of /cody/swapnilsparsh/30DaysOfJavaScript/19 - Traffic Lights

font/ cody/swapnilsparsh/30DaysOfJavaScript/19 - Traffic Lights/font/
1 Items
  • sans.ttf
  • assets/ cody/swapnilsparsh/30DaysOfJavaScript/19 - Traffic Lights/assets/
    1 Items
  • traffic-lights.png
  • style.css cody/swapnilsparsh/30DaysOfJavaScript/19 - Traffic Lights/style.css
    121 Views
    0 Comments
    * {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'sans';
    }

    @font-face {
    index.html cody/swapnilsparsh/30DaysOfJavaScript/19 - Traffic Lights/index.html
    342 Views
    0 Comments
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <link rel="shortcut icon" href="assets/traffic-lights.png" type="image/x-icon">
    script.js cody/swapnilsparsh/30DaysOfJavaScript/19 - Traffic Lights/script.js
    193 Views
    0 Comments
    const circles = document.querySelectorAll('.circle')
    let activeLight = 0;

    setInterval(() => {
    changeLight();
    }, 1000);

    function changeLight() {